/**
 * Created by hama on 2016/6/11.
 */


$('form').submit(function(e){
    e.preventDefault();
    var data = $(this).serialize();
    $.post('/signin',data,function(res){
        if(res.code == 'success'){
            location.href = '/';
        }else{
            $('.modal-body').text(res.message);
            $('.modal').modal('show');
        }
    })
})